package com.ruoyi.common.core.domain.model;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * H5发送短信验证码请求参数
 */
@Data
public class H5SendSmsCodeBody {

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phoneNumber;

    @NotBlank(message = "场景不能为空")
    @Pattern(regexp = "^(register|login|forgot_password)$", message = "场景参数错误，只支持：register-注册，login-登录，forgot_password-忘记密码")
    private String scene;
}
